% Let the subsection can FloatBarrier
\let \oldsubsection \subsection
\renewcommand{\subsection}[2][]{
  \FloatBarrier
  \oldsubsection#1{#2}
}

% Let the subsubsection can FloatBarrier
\let \oldsubsubsection \subsubsection
\renewcommand{\subsubsection}[2][]{
  \FloatBarrier
  \oldsubsubsection#1{#2}
}

\newcommand{\erlang}{\emph{Erlang}}

\newcommand{\trm}{\emph{Routers' Information Manager}}
\newcommand{\tem}{\emph{Event Manager}}
\newcommand{\teg}{\emph{Event Generator}}
\newcommand{\tpm}{\emph{Packet Generator Manager}}

\newcommand{\nsid}{\emph{now\_source\_id}}
\newcommand{\tss}{\emph{timestamps}}
\newcommand{\sids}{\emph{sources}}

\newcommand{\mst}{T_{MST}}
\newcommand{\iat}{T_{IAT}}
\newcommand{\ed}{\emph{exponential distribution}}
\newcommand{\cdf}{\emph{Cumulative Distribution Function}}

\newcommand{\trod}{3.03767800318663}
\newcommand{\trolr}{0.0234928575799056}

\newcommand{\eventList}[1]{
  \emph{Event List}<#1>
}

\newcommand{\DataSet}{$\mathbb{D}$}

\newcommand{\ciTable}[2][]{
  \begin{tabular}{c|ccc}
  \hline
  Percentage & n value & Lower Limit#1 & Upper Limit#1\\
  \hline
  #2
  \hline
  \end{tabular}
}
\newcommand{\ciFormatTable}[2][]{
  \begin{tabular}{c|ccc}
  \hline
  Percentage & n value & Format#1 & Percentage\\
  \hline
  #2
  \hline
  \end{tabular}
}

\newcommand{\preline}[2]{edge [pre] node[auto,swap] {#1} (#2)}
\newcommand{\prelineBelow}[2]{edge [pre] node[below,swap] {#1} (#2)}
\newcommand{\postline}[2]{edge [post] node[auto,swap] {#1} (#2)}
\newcommand{\postlineBelow}[2]{edge [post] node[below,swap] {#1} (#2)}

\newcommand{\networkErlangMap}[9]{
  \begin{tikzpicture}
    [source/.style={circle,draw=blue!50,fill=blue!20,thick,
                   inner sep=0pt,minimum size=6mm},
     queue/.style={rectangle,draw=black!50,fill=black!20,thick,
                        inner sep=0pt,minimum size=4mm},
     dest/.style= {source,draw=red!75,fill=red!20},
     bend angle=45,
     pre/.style={<-,shorten <=1pt,>=stealth,semithick},
     post/.style={->,shorten >=1pt,>=stealth,semithick}
    ]
    \node[source](S124)at(0,0){$S1\,2\,4$};
    \node[source](S134)at(0,-1){$S1\,3\,4$};
    \node[source](S13)at(0,-3){$S1\,3$};

    \node[source](S24)at(3,2){$S2\,4$};

    \node[source](S34)at(3,-1){$S3\,4$};

    \node[queue](1A)at(2,0){$1A$}
      \preline{0.30}{S124};
    \node[queue](1B)at(2,-2){$1B$}
      \preline{0.20}{S134}
      \preline{0.70}{S13};

    \node[queue](2B)at(5,1){$2B$}
      \preline{0.25}{S24}
      \preline{#1}{1A};

    \node[queue](3B)at(6,-2){$3B$}
      \preline{#2}{1B}
      \preline{0.20}{S34};
    \node[queue](3C)at(6,-4){$3C$}
      \preline{#3}{1B};
    \node[dest](3D)at(8,-4){$3D$}
      \preline{#4}{3C};

    \node[queue](4A)at(8,-1){$4A$}
      \preline{#5}{2B}
      \prelineBelow{#6}{3B};
    \node[dest](4D)at(10,-1){$4D$}
      \preline{#7}{4A};

    \node[source](S32)at(2,-6){$S3\,2$};
    \node[queue](3A)at(4,-6){$3A$}
      \preline{0.80}{S32};
    \node[queue](2A)at(6,-6){$2A$}
      \preline{#8}{3A};
    \node[dest](2D)at(8,-6){$2D$}
      \preline{#9}{2A};

  \end{tikzpicture}
}

\tikzstyle{plot legend}=[
   rounded corners=2.5pt,inner xsep=3pt,inner ysep=2pt,
   draw=black!50,fill=white,
   font=\footnotesize,cells={anchor=center},
   nodes={inner sep=2pt,text depth=0.15em,rounded corners=0pt,right}]
\tikzstyle{every axis legend}=[plot legend,at={(1.1,0.8)},below right]
\tikzstyle{every axis y label}=[at={(0,0.5)},xshift=-25pt,rotate=0]

\input{../../java_src/dist/datas/a}
\input{../../java_src/dist/datas/b}
\input{../../java_src/dist/datas/c}
\input{../../java_src/dist/datas/d}
\input{../../java_src/dist/datas/e}
\input{../../java_src/dist/datas/f}
\input{../../java_src/dist/datas/g}
\input{../../java_src/dist/datas/h}

